package com.esl.model.admin;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name = "T_Loginlog")
@Cache(usage=CacheConcurrencyStrategy.READ_ONLY)
public class LoginLog implements Serializable {
	private Integer id;
	private Date date = new Date();
	private String username;
	private String loginIP;
	
	

	public LoginLog() {
		super();
	}

	public LoginLog(String username, String loginIP) {
		super();
		this.username = username;
		this.loginIP = loginIP;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "l_id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "l_date")
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Column(name = "l_username")
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@Column(name = "l_loginIP")
	public String getLoginIP() {
		return loginIP;
	}

	public void setLoginIP(String loginIP) {
		this.loginIP = loginIP;
	}

}
